home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0921.ZIP / LCOMMT.ARC / LCTP.TXT < prev    next >
Text File  |  1988-01-24  |  100KB  |  3,367 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       OVERVIEW                                      OVERVIEW                                      ________
  10.  
  11.  
  12.             FEATURES            FEATURES            ________
  13.  
  14.  
  15.             The LiteComm-TP Toolbox(tm) is a set of powerful routines
  16.             designed to provide easy access to the full capabilities of
  17.             the PC's asynchronous communications ports. In its initial
  18.             release, the LiteComm-TP ToolBox supports fully interrupt-
  19.             driven and buffered communications support on COM1 thru COM4
  20.             simultaneously. Now you can quickly incorporate
  21.             sophisticated communications support in your applications
  22.             without having in-depth knowledge of how the hardware
  23.             functions.
  24.  
  25.  
  26.             LiteComm-TP is implemented as a set of 3 units for the basic
  27.             product, with additional units providing the protocol-engine
  28.             capability.  The protocol engines are a part of the
  29.             registered version of the package.
  30.  
  31.  
  32.             The LiteComm ToolBox was originally developed in the C
  33.             language for use in CAD/CAM applications that required the
  34.             ability to have PC compatible systems communicating with a
  35.             variety of devices.  The introduction of version 4.0 of
  36.             Turbo PASCAL1 has made it possible for use to extend the
  37.             power and flexibility of the original LiteComm ToolBox(tm)
  38.             to Turbo PASCAL programmers.
  39.  
  40.  
  41.  
  42.             THE SHAREWARE CONCEPT            THE SHAREWARE CONCEPT            _____________________
  43.  
  44.  
  45.             Shareware is a "try before you buy" means of software
  46.             distribution. If you find a shareware product useful, pay
  47.             the registration fee, and let the authors know that you
  48.             support their efforts.
  49.  
  50.  
  51.             Information Technology, Ltd., is a member of, and supports
  52.             the standards of, ASP, The Association of Shareware
  53.             Professionals.
  54.  
  55.  
  56.  
  57.  
  58.             ____________________
  59.             1 Turbo PASCAL is a registerd trademark of Borland
  60.             International
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  71.                         for Microsoft, Datalight and Turbo C
  72.  
  73.                          LICENSE, WARRANTY AND REGISTRATION                         LICENSE, WARRANTY AND REGISTRATION                         __________________________________
  74.  
  75.  
  76.             LICENSE            LICENSE            _______
  77.  
  78.  
  79.             The LiteComm-TP ToolBox, is distributed as a shareware
  80.             product. In its shareware form, support is limited to COM1
  81.             only.  To receive the units that support the extended
  82.             features of LiteComm-TP and/or the source code for the
  83.             product, register your copy today. See the registration form
  84.             at the end of this manual.
  85.  
  86.  
  87.             Information Technology, Ltd, grants to registered users a
  88.             non-exclusive, perpetual license to the LiteComm-TP ToolBox,
  89.             subject to these terms and conditions:
  90.  
  91.  
  92.  
  93.                 1. You must treat your copy of the LiteComm-TP
  94.                    Toolbox as you would a book.  You may install
  95.                    the LiteComm-TP ToolBox on more than one
  96.                    machine, but you may use only one copy at a
  97.                    time.  If you desire, site licenses are
  98.                    available at a reduced cost.  You may make as
  99.                    many copies of the LiteComm-TP ToolBox as you
  100.                    require for the sole purpose of backup.
  101.  
  102.  
  103.                 2. You may incorporate portions of the LiteComm-TP
  104.                    ToolBox in products that you develop without the
  105.                    payment of additional royalties or license fees.
  106.                    You must include the statement 'Portions
  107.                    Copyright 1987, 1988, Information Technology,
  108.                    Ltd' in your product's documentation.
  109.  
  110.  
  111.                 3. You may copy and redistribute the shareware
  112.                    portion of the LiteComm-TP ToolBox, commonly
  113.                    known as LCOMMTP.ARC, but you may not modify in
  114.                    any way, the contents of the shareware package.
  115.                    Further, you may not charge a fee for providing
  116.                    such a copy, beyond a maximum $4.00 copying or
  117.                    duplication fee, without the express, written
  118.                    consent of Information Technology, Ltd,
  119.  
  120.  
  121.                 4. You may not redistribute, in any form, the
  122.                    source code for the LiteComm-TP ToolBox.
  123.                    Further, you may not translate the source code
  124.                    for the LiteComm-TP ToolBox into any other
  125.                    language without the express, written consent of
  126.                    Information Technology, Ltd.
  127.  
  128.                                        Page 2
  129.                   CopyRight (c) 1988 Information Technology, Ltd.
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  137.                         for Microsoft, Datalight and Turbo C
  138.  
  139.                 5. Information Technology reserves the right to
  140.                    change both the LiteComm-TP ToolBox or its
  141.                    documentation without prior notice, with no
  142.                    obligation to you, the licensee.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                        Page 3
  195.                   CopyRight (c) 1988 Information Technology, Ltd.
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  203.                         for Microsoft, Datalight and Turbo C
  204.  
  205.                 6. You agree that any disputes arising from this
  206.                    license will be subject to the laws of the state
  207.                    of Rhode Island.
  208.  
  209.  
  210.                 7. You agree to hold the developer and distributors
  211.                    of the LiteComm-TP ToolBox harmless for any
  212.                    damages, either direct or consequential, that
  213.                    might arise from the use of this product.
  214.  
  215.  
  216.                 8. You acknowledge that the LiteComm-TP ToolBox,
  217.                    libraries, source code, and documentation are
  218.                    the copyrighted property of Information
  219.                    Technology, Ltd.
  220.  
  221.  
  222.                 9. By your use of the LiteComm-TP ToolBox, you
  223.                    acknowledge that you have read, and understand
  224.                    the terms and conditions of this license.
  225.  
  226.  
  227.             WARRANTY            WARRANTY            ________
  228.  
  229.  
  230.             The LiteComm-TP ToolBox is distributed as-is and without
  231.             warranty, including, but not limited to, the implied
  232.             warranties of merchantability and fitness for a particular
  233.             purpose.
  234.  
  235.  
  236.             Information Technology, Ltd does warrant the distribution
  237.             media for a period of 30 days.  During that period,
  238.             Information Technology, Ltd will replace the distribution
  239.             media or provide a refund at its option.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                        Page 4
  261.                   CopyRight (c) 1988 Information Technology, Ltd.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  269.                         for Microsoft, Datalight and Turbo C
  270.  
  271.             REGISTERING YOUR COPY            REGISTERING YOUR COPY            _____________________
  272.  
  273.  
  274.             Registration of your copy of the LiteComm-TP ToolBox
  275.             provides you with several benefits:
  276.  
  277.  
  278.  
  279.                 1. Puts you on our mailing list for low-cost
  280.                    updates, enhancements, and alert bulletins when
  281.                    they occur.
  282.  
  283.  
  284.                 2. Gives you access to telephone support. Sorry,
  285.                    but we cannot provide support by telephone to
  286.                    unregistered user's of the ToolBox. Unregistered
  287.                    users can leave EMAIL on Compuserve to
  288.                    70166,1152; on GEnie to I.TECH; and on DELPHI to
  289.                    RBMACE. We will respond to EMAIL on an as-
  290.                    available basis.
  291.  
  292.  
  293.                 3.Helps to further the shareware concept.
  294.  
  295.             To register your copy, use the form at the end of this
  296.             documentation. You may also register on-line through
  297.             Compuserve, GEnie, or DELPHI, using EMAIL.
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                        Page 5
  327.                   CopyRight (c) 1988 Information Technology, Ltd.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  335.                         for Microsoft, Datalight and Turbo C
  336.  
  337.             NOTE            NOTE            ____
  338.  
  339.  
  340.             LiteComm-TP is a package undergoing continuing development.
  341.             Registered users of the product receive, in addition to the
  342.             fully-functional base package, units that provide protocol
  343.             engines supporting XModem, and YModem protocols.
  344.  
  345.  
  346.             We plan to follow these with similar engines for Windowed
  347.             XModem CompuServe B, Telink, and other protocols. These
  348.             engines, as they are released, will only be made available
  349.             to registered ToolBox users. The shareware version, as
  350.             enhanced but without the protocol engines, will continue to
  351.             be offered.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                        Page 6
  393.                   CopyRight (c) 1988 Information Technology, Ltd.
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  401.                         for Microsoft, Datalight and Turbo C
  402.  
  403.                              COMMUNICATIONS AND THE PC                             COMMUNICATIONS AND THE PC                             _________________________
  404.  
  405.  
  406.             PC SHORTCOMINGS            PC SHORTCOMINGS            _______________
  407.  
  408.  
  409.             This section is intended as a mini-tutorial on            ______________________________________________
  410.             communications concepts. We encourage you to read it,            _____________________________________________________
  411.             although it is not strictly necessary to do so.            _______________________________________________
  412.  
  413.  
  414.             The IBM-PC, and its close compatibles, is a generally well
  415.             thought-out, flexible, and well-executed computer.
  416.             Unfortunately, not as much can be said for the thought which
  417.             was given to the software which is meant to provide access
  418.             to that hardware. One of the shortcomings which is most
  419.             noticeable is in the support, or rather lack of it, that is
  420.             provided to handle access to the serial port. Support for
  421.             the serial port is limited by the BIOS to polled mode only,
  422.             i.e. a program must interrogate the port on a regular basis
  423.             to avoid losing received characters, and to check to
  424.             determine whether or not the port is ready to send a
  425.             character. Not only is this mode of operation primitive; it
  426.             also tends to cause complications when attempting to perform
  427.             any but the simplest of tasks, at slow speeds.
  428.  
  429.  
  430.             A novice might think that the hardware, in some way, is the
  431.             limiting factor. In fact, everything that is needed,
  432.             hardware-wise, to support a more sophisticated method of
  433.             handling the serial port is already there. All that is
  434.             missing is the software follow-through. The LiteComm-TP
  435.             ToolBox provides this missing software.
  436.  
  437.  
  438.  
  439.             THE 8250 UART            THE 8250 UART            _____________
  440.  
  441.  
  442.             The term serial port comes from the fact that both incoming
  443.             and outgoing characters entering and leaving the port do so
  444.             in a bitwise fashion. When we send a character out the
  445.             serial port, the responsible circuitry sends out information
  446.             one bit at a time. When we receive a character, this
  447.             circuitry accepts the individual bits and reassembles them
  448.             into a recognizable character. These very complex operations
  449.             are performed automatically by the 8250 UART (Universal
  450.             Asynchronous Receiver-Transmitter).
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                        Page 7
  459.                   CopyRight (c) 1988 Information Technology, Ltd.
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  467.                         for Microsoft, Datalight and Turbo C
  468.  
  469.             The 8250 UART is a fully programmable device that permits
  470.             independent control of the various parameters that affect
  471.             serial communications, i.e. baud rate, parity, number of
  472.             data bits, and number of stop bits. The 8250 also optionally
  473.             supports four types of interrupts, error/break detection,
  474.             modem status change detection, transmitter ready, and
  475.             received character ready. The LiteComm-TP ToolBox fully
  476.             supports all four type of interrupts.
  477.  
  478.  
  479.             The term asynchronous implies that there is no absolute                     asynchronous                                                       ____________                                  
  480.             timing associated with the transmission of information.
  481.             Instead, the clocking-in of the data bits is done by                         clocking-in                                                     ___________                            
  482.             counting the bits. The first bit sent or received is call
  483.             the start bit and signals the beginning of a new character.
  484.             The individual data bits follow the start bit which are
  485.             clocked out and in at the specified data rate, with the
  486.             least significant bit transferred first and the parity bit,
  487.             if present, transferred last. Finally one or more stop bits
  488.             follow, signalling the end of the character.
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                        Page 8
  525.                   CopyRight (c) 1988 Information Technology, Ltd.
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  533.                         for Microsoft, Datalight and Turbo C
  534.  
  535.             The 8250 UART takes care of all of the mechanics associated
  536.             with the process described in the preceding paragraph. The
  537.             UART will also detect and report error which may occur in
  538.             the process. For example, if the parity bit is incorrect,
  539.             the UART reports the fact. If too few or too many bits are
  540.             received, the UART will report a framing error or overrun
  541.             error respectively.
  542.  
  543.  
  544.             Since the transmission of information may depend on complex
  545.             interactions with another device, such as a modem or
  546.             computer, the 8250 can also report on the status of the
  547.             handshaking lines used to provide information about the            handshaking                                                        ___________                                            
  548.             status of the connection with the other device. These
  549.             signals are explained below.
  550.  
  551.  
  552.  
  553.  
  554.                                 SIGNAL DESCRIPTIONS
  555.             
  556.            _______________________________________________________________
  557.            |                                                             |
  558.                       CTS    Clear To Send     The other device will           |                                                             |
  559.                                                accept a transmission.           |                                                             |
  560.                       DSR    Data Set Ready    The other device           |                                                             |
  561.                                                is enabled.           |                                                             |
  562.                       RI     Ring Indicator    Usually reserved           |                                                             |
  563.                                                for modems only. The           |                                                             |
  564.                                                phone is ringing           |                                                             |
  565.                       DCD    Carrier Detect    Usually reserved for           |                                                             |
  566.                                                modems. The other modem's           |                                                             |
  567.                                                 carrier signal was           |                                                             |
  568.                                                detected.           |                                                             |
  569.            _______________________________________________________________           |                                                             |
  570.  
  571.             The header file for the LiteComm-TP ToolBox contains the
  572.             various bit masks required for you to make use of the
  573.             information provided by the 8250 UART.
  574.  
  575.  
  576.  
  577.             TOOLBOX NOTES AND WARNINGS            TOOLBOX NOTES AND WARNINGS            __________________________
  578.  
  579.  
  580.             Before you can send or receive information on a serial port
  581.             using the ToolBox, you must use the open function to enable
  582.             the line. This function initializes the 8250 UART with the
  583.             correct parameters, and introduces the UART into the
  584.             interrupt structure of the PC. The ToolBox will detect, and
  585.             report, any errors that you may make in selecting the port
  586.             or specifying the initial parameters. The ToolBox cannot and
  587.             will not detect an attempt to open a non-existent serial
  588.             port.
  589.  
  590.                                        Page 9
  591.                   CopyRight (c) 1988 Information Technology, Ltd.
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  599.                         for Microsoft, Datalight and Turbo C
  600.  
  601.             The ToolBox interfaces directly with the interrupt structure
  602.             of the PC. It is critical that, before exiting a program
  603.             that has opened a serial port that the serial port is closed
  604.             with the close function. If you exit your program without
  605.             closing the port, you may cause your system to crash since
  606.             the interrupt vector for the port might point to a section
  607.             of memory that no longer contains the needed code to support
  608.             the interrupt.  As an alternative, Turbo PASCAL permits you
  609.             to install one or more exit handlers (see the PASCAL
  610.             reference).  You may use this approach to provide a safe
  611.             shutdown, but be follow carefully Borland's recommendations
  612.             about implementing exit handlers.
  613.  
  614.  
  615.             Failure of the open function can be the result of either
  616.             improper parameters to the open function, or insufficient
  617.             memory available to allocate the requested buffers and
  618.             related control structures for the port. Memory for the
  619.             transmit and receive buffers as well as the port control
  620.             block are allocated from the heap. It is your responsibility
  621.             to insure that adequate memory is available for this
  622.             purpose.
  623.  
  624.  
  625.             Unless you are very familiar with the interrupt structure of
  626.             the PC, do not attempt to manipulate the interrupt enable
  627.             flag outside of the ToolBox. The ToolBox sets and clears the
  628.             interrupt enable flag at appropriate times and assumes that
  629.             it has sole control over the flag.
  630.  
  631.  
  632.             Unless otherwise specified, all library functions have been
  633.             compiled with the default structure alignment, i.e. the
  634.             structure alignment switch has not been used in creating the
  635.             ToolBox library.
  636.  
  637.  
  638.  
  639.                                 LITECOMM-TP HISTORY                                LITECOMM-TP HISTORY                                ___________________
  640.  
  641.  
  642.             VERSION 1.0            VERSION 1.0            ___________
  643.  
  644.  
  645.             Version 1.0 is the first version of LiteComm-TP to be
  646.             offered to the general public, although there have been 2
  647.             Beta releases prior to Version 1.0 release.  Version 1.0 is
  648.             the functional equivalent of the original LiteComm ToolBox,
  649.             version 2.5, except for YModem support which is still
  650.             undergoing development for the C environment.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.                                       Page 10
  657.                   CopyRight (c) 1988 Information Technology, Ltd.
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  665.                         for Microsoft, Datalight and Turbo C
  666.  
  667.                                     BEYOND COM2                                    BEYOND COM2                                    ___________
  668.  
  669.  
  670.             THE TOOLBOX METHODOLOGY            THE TOOLBOX METHODOLOGY            _______________________
  671.  
  672.  
  673.             In the design of the original PC, and in subsequent
  674.             variations such as the PC/AT, there were only provision for
  675.             two serial ports. Many manufacturers of add-in products,
  676.             both serial ports and internal modems have added the
  677.             capability to support 1 or more additional ports beyond the
  678.             COM2 limit. Generally, this can cause problems in the PC
  679.             since there is no room in the interrupt request scheme for
  680.             additional levels of interrupts, and there are no designated
  681.             interrupt vector for other additional ports.
  682.  
  683.  
  684.             The ToolBox approach to resolving these issues is to permit
  685.             the programmer a degree of control over the parameters that
  686.             govern the interrupt mechanism for COM3 and COM4.
  687.             Specifically, these parameters are: 1) the interrupt request
  688.             (IRQ) bit that is used to mask the 8259 interrupt
  689.             controller; 2) the interrupt vector number (not address) to
  690.             which the port is attached; and 3) the base i/o register for
  691.             the port itself. Of course, it is assumed that the port is
  692.             based upon the 8250 UART or compatible device.
  693.  
  694.  
  695.             Before you attempt to use COM3 and/or COM4, you must
  696.             determine from the port's documentation, the appropriate
  697.             values for these three parameters. As distributed, the
  698.             ToolBox assumes the following:
  699.  
  700.             
  701.             
  702.                                   COM3        COM4                                  ____        ____
  703.             
  704.                       IRQ Bit      4           3
  705.                       Vector #    0Ch         0Bh
  706.                       Base Reg    3E8h        2E8h
  707.  
  708.             You may change any or all of these values by using the
  709.             PortChange function described below, but only before you
  710.             open the port with CommOpen. Once the port has been opened,
  711.             PortChange is ineffective, and PortChange will not work on
  712.             COM1 or COM2.
  713.  
  714.  
  715.  
  716.             CAUTIONS            CAUTIONS            ________
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                       Page 11
  723.                   CopyRight (c) 1988 Information Technology, Ltd.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  731.                         for Microsoft, Datalight and Turbo C
  732.  
  733.             There is an intimate relationship between the IRQ setting
  734.             and the interrupt vector to which it relates. In the PC,
  735.             this relationship is controlled, in part, by the 8259
  736.             interrupt controller that is set during BIOS initialization.
  737.  
  738.  
  739.             In brief, the BIOS settings for the PC (and most close
  740.             compatibles) establish IRQ0 as being vector number 08h, and
  741.             subsequent IRQ levels at increasing vector numbers. These
  742.             vector numbers (or types in INTEL terms) act as a cpu-
  743.             directed call table to locations in the lowest 1K of system
  744.             memory. We can alter how the system responds to a given
  745.             interrupt by replacing or changing the values in the
  746.             associated vector position to point to a routine which we
  747.             supply.
  748.  
  749.  
  750.             COM3 and COM4 share two critical parameters with COM1 and
  751.             COM2 respectively, the IRQ bit and the interrupt vector
  752.             number. If you intend to use COM1 with COM3 or COM2 with
  753.             COM4 simultaneously, you must change the BOTH the vector
  754.             number and the IRQ for COM3 or COM4 to an unused or un-
  755.             needed vector. The ability for your add-on ports to handle
  756.             such a change is highly hardware dependent, so check your
  757.             port's documentation carefully. Failure to do so will result
  758.             in loss of data at best, and a system lockup at worst.
  759.  
  760.  
  761.             Judging from the questions asked by some users of LiteComm-
  762.             TP, there is evidently some mis-understanding about using
  763.             ports beyond COM2, and how this all relates to your
  764.             hardware. Before you can successfully use COM3 or COM4, you
  765.             must consider the following:
  766.  
  767.  
  768.  
  769.                 1. Does the hardware permit a change to the base
  770.                    port and/or the interrupt vector to which the
  771.                    port responds.  Some expansion cards will
  772.                    support changing one and not the other, giving
  773.                    rise to potential hardware conflicts and lost
  774.                    data.
  775.  
  776.  
  777.                 2. Does the hardware permit  re-assignment of the
  778.                    IRQ priority. Some expansion cards permit you to
  779.                    alter the IRQ priority, some won't. Suffice it
  780.                    to say from the previous discussion the any
  781.                    change to the IRQ priority must allow a
  782.                    corresponding change to the interrupt vector
  783.                    number. Without this capability, reprogramming
  784.                    of the 8259 chip would be required.
  785.  
  786.  
  787.  
  788.                                       Page 12
  789.                   CopyRight (c) 1988 Information Technology, Ltd.
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  797.                         for Microsoft, Datalight and Turbo C
  798.  
  799.                 3. In fact, many add-on cards permit this dual
  800.                    change simply by making a single switch or
  801.                    jumper setting. Unfortunately, the documentation
  802.                    for these cards  generally assume that you are
  803.                    aware of the dual nature of the IRQ vector
  804.                    relationship, and may leave you with the
  805.                    impression that you are changing one and not the
  806.                    other. In most circumstances, this is not the
  807.                    case.
  808.  
  809.             The point to all of this is that LiteComm-TP can only
  810.             provide as much support as the hardware permits, or is
  811.             capable of responding to. If you wish to use other than the
  812.             default base port, interrupt vector, or irq priority for
  813.             COM3 or COM4, then your expansion card must be capable of
  814.             supporting the new values; in other words, these values are
  815.             all hardware-provided, and are recognized by the LiteComm-TP
  816.             software. If your hardware does not permit changing a value,
  817.             LiteComm-TP cannot improve the situation.
  818.  
  819.  
  820.             We should, at this point, add one final caution about how
  821.             interrupt priorities function, and their relationship to the
  822.             irq bit the you may select. The standard PC permits 8
  823.             interrupt priority levels, with the programmable timer
  824.             having the highest priority, and the parallel printer port
  825.             having the lowest priority. When an interrupt occurs, the
  826.             interrupt controller (8259 chip) masks out all other
  827.             interrupts from the priority of the interrupting device and
  828.             all lower priority devices.
  829.  
  830.  
  831.             As an aid to making COM3 and COM4 "fit", LiteComm-TP
  832.             supports interrupt chaining for the COM3 and COM4 ports. If
  833.             you use COM3 or COM4, when an interrupt occurs, the kernel
  834.             will attempt to determine if the interrupt was caused by the
  835.             supported port or from some other source.
  836.  
  837.  
  838.             If the kernel determines that the supported port did not
  839.             cause the interrupt, an automatic chain to the original
  840.             interrupt handler for that interrupt level (IRQ level) will
  841.             take place, allowing you to "patch in" or share the
  842.             available interrupt vectors.
  843.  
  844.  
  845.             If you intend to use other than the provided defaults, be
  846.             sure that you understand the interrupt mechanism. The use of
  847.             the automatic chaining described above can be particularly
  848.             troublesome under some circumstances, resulting in loss of
  849.             interrupts and, potentially, a system crash.
  850.  
  851.  
  852.  
  853.  
  854.                                       Page 13
  855.                   CopyRight (c) 1988 Information Technology, Ltd.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  863.                         for Microsoft, Datalight and Turbo C
  864.  
  865.                                   PACKAGE CONTENTS                                  PACKAGE CONTENTS                                  ________________
  866.  
  867.             Your distribution diskette contains several files that are
  868.             important to you. All distribution diskettes, at a minimum,
  869.             include the following files in the diskette's root
  870.             directory:
  871.  
  872.             
  873.             .fo off
  874.                    PSERIAL.NUM       SERIAL NUMBER OF THIS COPY
  875.                    READ.ME           LATEST INFORMATION ABOUT
  876.                                      LITECOMM-TP
  877.             
  878.                    LTCOMM.ARC        SHAREWARE VERSION AND DOCUMENTATION
  879.                                      FILES
  880.             
  881.                    LTUNITS.ARC       FULLY FUNCTIONAL UNIT FILES
  882.             
  883.  
  884.             If you registered for the source code modules, the diskette
  885.             contains a sub directory called SOURCE.  The SOURCE
  886.             directory contains 2 source code archives.
  887.  
  888.             
  889.             
  890.                    LITECOMM-TP SOURCE CODE    LTSRC.ARC
  891.             
  892.                    XMODEM ENGINE SOURCE CODE  LTXMSRC.ARC
  893.             
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                                       Page 14
  921.                   CopyRight (c) 1988 Information Technology, Ltd.
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  929.                         for Microsoft, Datalight and Turbo C
  930.  
  931.                              INSTALLATION INSTRUCTIONS                             INSTALLATION INSTRUCTIONS                             _________________________
  932.  
  933.             In the following discussion, we assume that your regular            ________________________________________________________
  934.             unit files are contained in a directory called \TP.                                                           \TP             ___________________________________________________
  935.  
  936.  
  937.             To install the unit files used with LiteComm-TP, perform the
  938.             following steps:
  939.  
  940.  
  941.  
  942.                 1. CD \TP
  943.  
  944.  
  945.                 2. ARC E A:LTUNITS
  946.  
  947.             Since Turbo PASCAL permits you the flexibility of having a
  948.             separate sub-directory for units, you should execute the
  949.             above instructions in whatever directory you use for units.
  950.  
  951.  
  952.             If you are installing only the units, this completes the
  953.             installation procedure. If you have registered for the
  954.             package's source code, we recommend that you create a
  955.             separate sub-directory.  The example below assumes that you
  956.             will use a directory named COMM to hold the LiteComm-TP and
  957.             XModem source code modules. To install the LiteComm-TP
  958.             source code, do the following:
  959.  
  960.  
  961.  
  962.                 1. MD \COMM
  963.  
  964.  
  965.                 2. CD \COMM
  966.  
  967.  
  968.                 3. ARC E A:LTSRC *.*
  969.  
  970.  
  971.                 4. ARC E A:LTXMSRC *.*
  972.  
  973.             We strongly urge that you use the recommended approach in
  974.             handling the source code to avoid naming conflicts that
  975.             might arise.
  976.  
  977.  
  978.  
  979.                                    GENERAL NOTES                                   GENERAL NOTES                                   _____________
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.                                       Page 15
  987.                   CopyRight (c) 1988 Information Technology, Ltd.
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  995.                         for Microsoft, Datalight and Turbo C
  996.  
  997.             In the discussion of the various functions which follow, you
  998.             should assume that any references to the 'port' variable
  999.             refer to a variable or constant that may take on a value of
  1000.             from 1 to 4. No other values are acceptable, and will be
  1001.             rejected.
  1002.  
  1003.  
  1004.             While we feel that LiteComm-TP is written in the most
  1005.             efficient way possible, commensurate with good programming
  1006.             practice, we cannot be responsible for variations caused by
  1007.             hardware configurations or other factors beyond our control.
  1008.             LiteComm-TP has been tested, and is known to perform on, the
  1009.             IBM PC-AT and several compatible systems such as the Zenith
  1010.             and Wyse equivalents. LiteComm-TP has not been tested in
  1011.             environments in which other software, most significantly TSR
  1012.             (terminate and stay resident) modules exist. Some TSR
  1013.             programs that "steal" interrupts for their own purposes
  1014.             present an unfavorable environment to other programs that
  1015.             rely on the interrupt structure of the computer.
  1016.  
  1017.  
  1018.             Should you experience erratic behavior with LiteComm-TP in a
  1019.             TSR-type situation, try executing your application without
  1020.             the TSR module being present. If the problems you have
  1021.             experienced disappear, suspect the TSR module.
  1022.  
  1023.  
  1024.             Conversely, LiteComm-TP provides an excellent vehicle for
  1025.             supporting TSR programs that you may write. Since the
  1026.             package is fully reentrant, your only concern need be with
  1027.             those aspects of TSR programs are of normal concern, e.g.
  1028.             the non-reentrant nature of DOS. LiteComm-TP never uses DOS
  1029.             functions and may therefore be safely used in a TSR
  1030.             environment.
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                       Page 16
  1053.                   CopyRight (c) 1988 Information Technology, Ltd.
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1061.                         for Microsoft, Datalight and Turbo C
  1062.  
  1063.                           PROCEDURE AND FUNCTION REFERENCE                          PROCEDURE AND FUNCTION REFERENCE                          ________________________________
  1064.  
  1065.             In the following pages, we provide the detailed information
  1066.             about each of the available LiteComm-TP ToolBox functions
  1067.             and procedures.  Each definition includes, at a minimum, a
  1068.             summary of how the function or procedure is referenced, in
  1069.             which unit the function or procedure is found, a description
  1070.             of what the function or procedure does, and an indication of
  1071.             those values, if any, that might be returned.
  1072.  
  1073.  
  1074.             Where appropriate, we include additional documentation about
  1075.             the function.  Some definitions include examples, in the
  1076.             sense of code fragments illustrating the function's usage.
  1077.             More importantly, some definitions include additional notes
  1078.             and warnings as well as references to other functions within
  1079.             the package.
  1080.  
  1081.  
  1082.             We have made every effort to insure that the documentation
  1083.             of the functions is complete and accurate.  The style and
  1084.             manner of the documentation assumes that the reader is
  1085.             thoroughly familiar with the elements of C syntax and common
  1086.             conventions.
  1087.  
  1088.  
  1089.  
  1090.             UNIT USAGE            UNIT USAGE            __________
  1091.  
  1092.  
  1093.             To assist you in developing your own applications, you will
  1094.             need to know the following information.
  1095.  
  1096.  
  1097.                          Unit                    Uses
  1098.             
  1099.                        LctKrnl                   DOS
  1100.                        LctSupp                   DOS, LctKrnl
  1101.                        LctHayes                  DOS, LctSupp
  1102.                        LcTimer                   DOS *
  1103.                        LTXMKrnl                  DOS, LctSupp, LcTimer *
  1104.                        LTXModem                  DOS, LctSupp, LTXMKrnl
  1105.                                                  LcTimer *
  1106.             
  1107.             * This unit part of registered version only.
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                                       Page 17
  1119.                   CopyRight (c) 1988 Information Technology, Ltd.
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1127.                         for Microsoft, Datalight and Turbo C
  1128.            _______________________________________________________________           _______________________________________________________________
  1129.  
  1130.                PortChange function                           LctKrnl               PortChange function                           LctKrnl
  1131.            _______________________________________________________________           _______________________________________________________________
  1132.  
  1133.  
  1134.             FUNCTION            FUNCTION            ________
  1135.  
  1136.             Changes one or more of the critical parameters for port COM3
  1137.             or COM4.
  1138.  
  1139.  
  1140.  
  1141.             DECLARATION            DECLARATION            ___________
  1142.  
  1143.             Portchange(CPort:integer; NewBase:word; NewIrq,
  1144.             NewVector:byte)
  1145.  
  1146.  
  1147.  
  1148.             RESULT TYPE            RESULT TYPE            ___________
  1149.  
  1150.                  boolean
  1151.  
  1152.  
  1153.  
  1154.             REMARKS            REMARKS            _______
  1155.  
  1156.             This function must be used before the port is opened to be
  1157.             effective. To leave any of the parameters at its default
  1158.             value, make the corresponding entry 0. Note that vector is a
  1159.             vector number, not an address or pointer.
  1160.  
  1161.  
  1162.             The irq parameter should not be taken to be the irq
  1163.             (interrupt request number), but rather the irq mask. For
  1164.             example, the correct value for irq4 is NOT 4, but a byte in
  1165.             which bit 4, using INTEL's bit numbering, is set to a value
  1166.             of 1. Thus, to use irq priority 4 as the irq for either COM3
  1167.             or COM4, you would specify $10 as the value of irq when
  1168.             calling PortChange.
  1169.  
  1170.  
  1171.             If you intend to change the default irq settings, you MUST
  1172.             also make a corresponding change to the vector number. See
  1173.             the preceding section about using COM3 and COM4 for
  1174.             additional details. Failure to follow this rule may make the
  1175.             port appear to be non-functional.
  1176.  
  1177.  
  1178.             The PortChange function does NOT check to determine that you
  1179.             have provided both an IRQ mask AND a new vector number.
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                                       Page 18
  1185.                   CopyRight (c) 1988 Information Technology, Ltd.
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1193.                         for Microsoft, Datalight and Turbo C
  1194.  
  1195.             PortChange returns a value of TRUE if the change was
  1196.             successful, false otherwise.
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.                                       Page 19
  1251.                   CopyRight (c) 1988 Information Technology, Ltd.
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1259.                         for Microsoft, Datalight and Turbo C
  1260.  
  1261.             EXAMPLE            EXAMPLE            _______
  1262.  
  1263.                  Var
  1264.                     Newbase : word;
  1265.                     Newirq : byte;
  1266.                     NewVector : byte;
  1267.                     
  1268.                     Begin
  1269.                       Newbase := $03E8;
  1270.                       Newirq := $10;
  1271.                       NewVector := $0C;
  1272.                     
  1273.                       if PortChange(3, Newbase, Newirq, NewVector)
  1274.                     then
  1275.                       Writeln('Port 3 Changed')
  1276.                     else
  1277.                       Writeln('Error changing Port 3');
  1278.                     end;
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.                                       Page 20
  1317.                   CopyRight (c) 1988 Information Technology, Ltd.
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1325.                         for Microsoft, Datalight and Turbo C
  1326.            _______________________________________________________________           _______________________________________________________________
  1327.  
  1328.                CommOpen function                             LctKrnl               CommOpen function                             LctKrnl
  1329.            _______________________________________________________________           _______________________________________________________________
  1330.  
  1331.  
  1332.             FUNCTION            FUNCTION            ________
  1333.  
  1334.             Prepares the specified port for use by the other functions
  1335.  
  1336.  
  1337.  
  1338.             DECLARATION            DECLARATION            ___________
  1339.  
  1340.             CommOpen(CPort, Baud:integer; Parity:char; Databits,
  1341.             Stopbits, InSize, OutSize:integer)
  1342.  
  1343.  
  1344.  
  1345.             RESULT TYPE            RESULT TYPE            ___________
  1346.  
  1347.                  boolean
  1348.  
  1349.  
  1350.  
  1351.             REMARKS            REMARKS            _______
  1352.  
  1353.             Opens the specified port for use and attaches an interrupt
  1354.             handler to DOS for the port. The function allocates buffers
  1355.             for input and output of the specified sizes, and sets the
  1356.             port to the parameters specified. The minimum value for
  1357.             InSize is 128; the minimum size for OutSize is 64. A port
  1358.             opened in this manner must be closed using CommClose before
  1359.             program termination to avoid the possibility of a system
  1360.             crash.
  1361.  
  1362.  
  1363.             The parameters passed to the function are discrete values,
  1364.             and must be drawn from the following lists:
  1365.  
  1366.  
  1367.             Baud: 110, 300, 600, 1200, 2400, 4800, 9600, 19200
  1368.             Parity: E, O, N, M, S
  1369.                  E - Even
  1370.                  O - Odd
  1371.                  N - None
  1372.                  M - Mark
  1373.                  S - Space
  1374.             Databits: 5, 6, 7, 8
  1375.             StopBits: 1, 2
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                                       Page 21
  1383.                   CopyRight (c) 1988 Information Technology, Ltd.
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1391.                         for Microsoft, Datalight and Turbo C
  1392.  
  1393.             A return of TRUE indicates the port has been successfully
  1394.             opened and is ready for use.  A return of FALSE indicates an
  1395.             error occurred, either as the result of an invalid
  1396.             parameter, or insufficient heap space available to allocate
  1397.             the buffers and control structures for the port.
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                                       Page 22
  1449.                   CopyRight (c) 1988 Information Technology, Ltd.
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1457.                         for Microsoft, Datalight and Turbo C
  1458.  
  1459.             EXAMPLE            EXAMPLE            _______
  1460.  
  1461.                  Var
  1462.                     Baud, Databits, Stopbits : integer;
  1463.                     Parity : char;
  1464.                     Insize, Outsize : integer;
  1465.                     
  1466.                     begin
  1467.                       Baud := 2400;
  1468.                       Parity := 'E';
  1469.                       Databits := 7;
  1470.                       Stopbits := 1;
  1471.                       Insize := 256;
  1472.                       Outsize := 256;
  1473.                     
  1474.                       if CommOpen(1, Baud, Parity, Databits,
  1475.                     Stopbits, Insize, Outsize) then
  1476.                            Writeln('COM1 available for use')
  1477.                       else
  1478.                            Writeln('Error opening COM1');
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                                       Page 23
  1515.                   CopyRight (c) 1988 Information Technology, Ltd.
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1523.                         for Microsoft, Datalight and Turbo C
  1524.            _______________________________________________________________           _______________________________________________________________
  1525.  
  1526.                CommClose procedure                           LctKrnl               CommClose procedure                           LctKrnl
  1527.            _______________________________________________________________           _______________________________________________________________
  1528.  
  1529.  
  1530.             FUNCTION            FUNCTION            ________
  1531.  
  1532.             Closes a port that has been opened by the CommOpen function
  1533.  
  1534.  
  1535.  
  1536.             DECLARATION            DECLARATION            ___________
  1537.  
  1538.             CommClose(CPort:integer)
  1539.  
  1540.  
  1541.  
  1542.             REMARKS            REMARKS            _______
  1543.  
  1544.             This function is the companion to CommOpen and, in effect,
  1545.             performs the opposite action. CommClose detaches the kernel
  1546.             interrupt handler from the port, and reconnects the previous
  1547.             interrupt handler. CommClose also release dynamically
  1548.             allocated memory used for buffering and control structures.
  1549.             Failure to call CommClose before terminating a program may
  1550.             result in unexplained system crashes or hangs.
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.                                       Page 24
  1581.                   CopyRight (c) 1988 Information Technology, Ltd.
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1589.                         for Microsoft, Datalight and Turbo C
  1590.            _______________________________________________________________           _______________________________________________________________
  1591.  
  1592.                CommSetup function                            LctKrnl               CommSetup function                            LctKrnl
  1593.            _______________________________________________________________           _______________________________________________________________
  1594.  
  1595.  
  1596.             FUNCTION            FUNCTION            ________
  1597.  
  1598.             Provides the capability of changing the parameters for an
  1599.             open port, without breaking the connection or closing the
  1600.             port.
  1601.  
  1602.  
  1603.  
  1604.             DECLARATION            DECLARATION            ___________
  1605.  
  1606.             CommSetup(CPort, Baud:integer; Parity:char; Databits,
  1607.             Stopbits:integer)
  1608.  
  1609.  
  1610.  
  1611.             RESULT TYPE            RESULT TYPE            ___________
  1612.  
  1613.                  boolean
  1614.  
  1615.  
  1616.  
  1617.             REMARKS            REMARKS            _______
  1618.  
  1619.             The CommSetup function is a subset of the CommOpen function
  1620.             and the remarks made in the description of CommOpen apply.
  1621.             This function is useful if you wish to change the basic
  1622.             communication parameters of the specified port that has
  1623.             already been opened without CommClose'ing the port and
  1624.             breaking the connection.
  1625.  
  1626.  
  1627.  
  1628.             SEE ALSO            SEE ALSO            ________
  1629.  
  1630.                  CommOpen
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.                                       Page 25
  1647.                   CopyRight (c) 1988 Information Technology, Ltd.
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1655.                         for Microsoft, Datalight and Turbo C
  1656.            _______________________________________________________________           _______________________________________________________________
  1657.  
  1658.                ValidatePort function                         LctKrnl               ValidatePort function                         LctKrnl
  1659.            _______________________________________________________________           _______________________________________________________________
  1660.  
  1661.  
  1662.             FUNCTION            FUNCTION            ________
  1663.  
  1664.             Verifies that the specified port has been opened and returns
  1665.             a pointer to the Communications Control Block for the port.
  1666.  
  1667.  
  1668.  
  1669.             DECLARATION            DECLARATION            ___________
  1670.  
  1671.             ValidatePort(CPort:integer)
  1672.  
  1673.  
  1674.  
  1675.             RESULT TYPE            RESULT TYPE            ___________
  1676.  
  1677.                  CCBPTR
  1678.  
  1679.  
  1680.  
  1681.             REMARKS            REMARKS            _______
  1682.  
  1683.             Used internally to validate that the port number specified
  1684.             is correct and has been opened with the CommOpen function.
  1685.             May be of use to you in writing certain applications that
  1686.             require access to the Communications Control Block.  The
  1687.             function returns a value of NIL if the specified port is
  1688.             incorrect or not open.
  1689.  
  1690.  
  1691.  
  1692.             EXAMPLE            EXAMPLE            _______
  1693.  
  1694.                  if ValidatePort(2) <> NIL then
  1695.                       Writeln('The port has been opened')
  1696.                     else
  1697.                       Writeln('The port is nor presently open');
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.                                       Page 26
  1713.                   CopyRight (c) 1988 Information Technology, Ltd.
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1721.                         for Microsoft, Datalight and Turbo C
  1722.            _______________________________________________________________           _______________________________________________________________
  1723.  
  1724.                BytesInInput function                         LctSupp               BytesInInput function                         LctSupp
  1725.            _______________________________________________________________           _______________________________________________________________
  1726.  
  1727.  
  1728.             FUNCTION            FUNCTION            ________
  1729.  
  1730.             Returns the number of characters currently available in the
  1731.             input buffer (BytesInInput) or the number of untransmitted
  1732.             characters in the output buffer (ByteInOutput).
  1733.  
  1734.  
  1735.  
  1736.             DECLARATION            DECLARATION            ___________
  1737.  
  1738.             BytesInInput(CPort:integer)
  1739.             BytesInOutput(CPort:integer)
  1740.  
  1741.  
  1742.  
  1743.             RESULT TYPE            RESULT TYPE            ___________
  1744.  
  1745.                  integer
  1746.  
  1747.  
  1748.  
  1749.             REMARKS            REMARKS            _______
  1750.  
  1751.             May be used to determine the number of characters currently
  1752.             in the input (BytesInInput) or output (BytesInOutput)
  1753.             buffers for the port. In the event of an error (bad port), a
  1754.             value of -1 is returned.
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.                                       Page 27
  1779.                   CopyRight (c) 1988 Information Technology, Ltd.
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1787.                         for Microsoft, Datalight and Turbo C
  1788.            _______________________________________________________________           _______________________________________________________________
  1789.  
  1790.                ModemStatus function                          LctKrnl               ModemStatus function                          LctKrnl
  1791.            _______________________________________________________________           _______________________________________________________________
  1792.  
  1793.  
  1794.             FUNCTION            FUNCTION            ________
  1795.  
  1796.             Returns the last know status of the modem control lines for
  1797.             the specified port.
  1798.  
  1799.  
  1800.  
  1801.             DECLARATION            DECLARATION            ___________
  1802.  
  1803.             ModemStatus(CPort:integer)
  1804.  
  1805.  
  1806.  
  1807.             RESULT TYPE            RESULT TYPE            ___________
  1808.  
  1809.                  byte
  1810.  
  1811.  
  1812.  
  1813.             REMARKS            REMARKS            _______
  1814.  
  1815.             Use this function to determine the last known state of the
  1816.             modem-supplied handshake signals. These may be tested using
  1817.             the values included in the unit, using PASCAL's bitwise AND
  1818.             operator.  NOTE: You should be aware that the handshake
  1819.             signals returned are reset once this function is called.
  1820.             Subsequent calls to this function will return to last known
  1821.             value for all signals.  The signals which are tracked are
  1822.             CTS, DSR, RI, and DCD.
  1823.  
  1824.  
  1825.             To determine which signals, if any, have changed use the
  1826.             DeltaXXX bits returned. For example, if CTS has changed, the
  1827.             DeltaCTS bit will be set.  The actual CTS value (on or off)
  1828.             will be found in the CTS bit of the returned byte.
  1829.  
  1830.  
  1831.             In the event of an error, a byte of $00 is returned.
  1832.  
  1833.  
  1834.  
  1835.             EXAMPLE            EXAMPLE            _______
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.                                       Page 28
  1845.                   CopyRight (c) 1988 Information Technology, Ltd.
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1853.                         for Microsoft, Datalight and Turbo C
  1854.  
  1855.                  Var
  1856.                     CStat : byte;
  1857.                     
  1858.                     begin
  1859.                       CStat := ModemStatus(1);
  1860.                       if CStat and DeltaCTS = DeltaCTS then
  1861.                         if CStat and CTS <> CTS then
  1862.                            Writeln('The connection is broken');
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.                                       Page 29
  1911.                   CopyRight (c) 1988 Information Technology, Ltd.
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1919.                         for Microsoft, Datalight and Turbo C
  1920.            _______________________________________________________________           _______________________________________________________________
  1921.  
  1922.                ErrorStatus function                          LctKrnl               ErrorStatus function                          LctKrnl
  1923.            _______________________________________________________________           _______________________________________________________________
  1924.  
  1925.  
  1926.             FUNCTION            FUNCTION            ________
  1927.  
  1928.             Return the last known error status for the specified port.
  1929.  
  1930.  
  1931.  
  1932.             DECLARATION            DECLARATION            ___________
  1933.  
  1934.             ErrorStatus(CPort:integer)
  1935.  
  1936.  
  1937.  
  1938.             RESULT TYPE            RESULT TYPE            ___________
  1939.  
  1940.                  byte
  1941.  
  1942.  
  1943.  
  1944.             REMARKS            REMARKS            _______
  1945.  
  1946.             Returns the last known state of the serial port's error
  1947.             status bits, encoded in a byte. These may be tested using
  1948.             the constants defined in the unit in conjunction with
  1949.             PASCAL's bitwise AND operator.  The applicable values that
  1950.             may be checked are OverRun, BadParity, BadFrame, and
  1951.             BreakDet.  In the event of an error, a byte of $00 is
  1952.             returned.
  1953.  
  1954.  
  1955.             Once the error status bits have been read in this fashion,
  1956.             they are reset to $00, and will remain so until the next
  1957.             error occurs.  Since this process happens asynchronously, it
  1958.             is not possible for your application to determine which
  1959.             character created the error, only that the error occurred.
  1960.  
  1961.  
  1962.  
  1963.             EXAMPLE            EXAMPLE            _______
  1964.  
  1965.                  Var
  1966.                     EStat : byte;
  1967.                     
  1968.                     begin
  1969.                       EStat := ErrorStatus(2);
  1970.                       if EStat and BreakDet = BreakDet then
  1971.                         Writeln('Break Signal detected on Port 2');
  1972.  
  1973.  
  1974.  
  1975.  
  1976.                                       Page 30
  1977.                   CopyRight (c) 1988 Information Technology, Ltd.
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  1985.                         for Microsoft, Datalight and Turbo C
  1986.            _______________________________________________________________           _______________________________________________________________
  1987.  
  1988.                SetModemSignals function                      LctKrnl               SetModemSignals function                      LctKrnl
  1989.            _______________________________________________________________           _______________________________________________________________
  1990.  
  1991.  
  1992.             FUNCTION            FUNCTION            ________
  1993.  
  1994.             Allows the programmer to set the individual modem control
  1995.             lines for the specified port.
  1996.  
  1997.  
  1998.  
  1999.             DECLARATION            DECLARATION            ___________
  2000.  
  2001.             SetModemSignals(CPort:integer; NewSet:byte)
  2002.  
  2003.  
  2004.  
  2005.             RESULT TYPE            RESULT TYPE            ___________
  2006.  
  2007.                  boolean
  2008.  
  2009.  
  2010.  
  2011.             REMARKS            REMARKS            _______
  2012.  
  2013.             Set one or more of the modem control signals. Because of the
  2014.             need to always have OUT2 set for interrupt support, the
  2015.             function always provides the correct setting for this bit.
  2016.  
  2017.  
  2018.             The value of NewSet is bitwise OR'ed with the current set of
  2019.             values to produce a new modem control setting.  The value of
  2020.             NewSet DOES NOT replace the current values. Use the
  2021.             constants supplied in the unit to obtain the correct values.
  2022.             These include DTR and RTS.
  2023.  
  2024.  
  2025.  
  2026.             EXAMPLE            EXAMPLE            _______
  2027.  
  2028.                  begin
  2029.                     if SetModemSignals(1, (DTR and RTS)) then
  2030.                       Writeln('Port is ready to transmit')
  2031.                     else
  2032.                       Writeln('Unable to set modem signals');
  2033.  
  2034.  
  2035.             SEE ALSO            SEE ALSO            ________
  2036.                  ClearModemSignals, FlipModemSignals
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.                                       Page 31
  2043.                   CopyRight (c) 1988 Information Technology, Ltd.
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2051.                         for Microsoft, Datalight and Turbo C
  2052.            _______________________________________________________________           _______________________________________________________________
  2053.  
  2054.                ClearModemSignals function                    LctKrnl               ClearModemSignals function                    LctKrnl
  2055.            _______________________________________________________________           _______________________________________________________________
  2056.  
  2057.  
  2058.             FUNCTION            FUNCTION            ________
  2059.  
  2060.             Allows the programmer to clear (reset) the individual modem
  2061.             control lines for the specified port.
  2062.  
  2063.  
  2064.  
  2065.             DECLARATION            DECLARATION            ___________
  2066.  
  2067.             ClearModemSignals(CPort:integer; NewSet:byte)
  2068.  
  2069.  
  2070.  
  2071.             RESULT TYPE            RESULT TYPE            ___________
  2072.  
  2073.                  boolean
  2074.  
  2075.  
  2076.  
  2077.             REMARKS            REMARKS            _______
  2078.  
  2079.             Clears (resets) one or more of the modem control signals.
  2080.             Because of the need to always have OUT2 set for interrupt
  2081.             support, the function always provides the correct setting
  2082.             for this bit.
  2083.  
  2084.  
  2085.             The compliment of NewSet is bitwise AND'ed with the current
  2086.             set of values to produce a new modem control setting.  The
  2087.             value of NewSet DOES NOT replace the current values. Use the
  2088.             constants supplied in the unit to obtain the correct values.
  2089.             These include DTR and RTS.
  2090.  
  2091.  
  2092.  
  2093.             EXAMPLE            EXAMPLE            _______
  2094.  
  2095.                  begin
  2096.                     if ClearModemSignals(1,  RTS) then
  2097.                       Writeln('RTS for Port 1 has been dropped')
  2098.                     else
  2099.                       Writeln('Unable to clear RTS');
  2100.  
  2101.  
  2102.             SEE ALSO            SEE ALSO            ________
  2103.                  SetModemSignals, FlipModemSignals
  2104.  
  2105.  
  2106.  
  2107.  
  2108.                                       Page 32
  2109.                   CopyRight (c) 1988 Information Technology, Ltd.
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2117.                         for Microsoft, Datalight and Turbo C
  2118.            _______________________________________________________________           _______________________________________________________________
  2119.  
  2120.                FlipModemSignals function                     LctKrnl               FlipModemSignals function                     LctKrnl
  2121.            _______________________________________________________________           _______________________________________________________________
  2122.  
  2123.  
  2124.             FUNCTION            FUNCTION            ________
  2125.  
  2126.             Allows the programmer to compliment(toggle) the individual
  2127.             modem control lines for the specified port.
  2128.  
  2129.  
  2130.  
  2131.             DECLARATION            DECLARATION            ___________
  2132.  
  2133.             FlipModemSignals(CPort:integer; NewSet:byte)
  2134.  
  2135.  
  2136.  
  2137.             RESULT TYPE            RESULT TYPE            ___________
  2138.  
  2139.                  boolean
  2140.  
  2141.  
  2142.  
  2143.             REMARKS            REMARKS            _______
  2144.  
  2145.             Complements(toggles) one or more of the modem control
  2146.             signals. Because of the need to always have OUT2 set for
  2147.             interrupt support, the function always provides the correct
  2148.             setting for this bit.
  2149.  
  2150.  
  2151.             The value of NewSet is bitwise XOR'ed with the current set
  2152.             of values to produce a new modem control setting.  The value
  2153.             of NewSet DOES NOT replace the current values. Use the
  2154.             constants supplied in the unit to obtain the correct values.
  2155.             These include DTR and RTS.
  2156.  
  2157.  
  2158.  
  2159.             EXAMPLE            EXAMPLE            _______
  2160.  
  2161.                  begin
  2162.                     if FlipModemSignals(1, RTS) then
  2163.                       Writeln('RTS for Port 1 has been changed')
  2164.                     else
  2165.                       Writeln('Unable to change RTS');
  2166.  
  2167.  
  2168.             SEE ALSO            SEE ALSO            ________
  2169.                  SetModemSignals, ClearModemSignals
  2170.  
  2171.  
  2172.  
  2173.  
  2174.                                       Page 33
  2175.                   CopyRight (c) 1988 Information Technology, Ltd.
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2183.                         for Microsoft, Datalight and Turbo C
  2184.            _______________________________________________________________           _______________________________________________________________
  2185.  
  2186.                EnableXon function                            LctKrnl               EnableXon function                            LctKrnl
  2187.            _______________________________________________________________           _______________________________________________________________
  2188.  
  2189.  
  2190.             FUNCTION            FUNCTION            ________
  2191.  
  2192.  
  2193.             Enable or disable the semi-automatic flow control features
  2194.             of LiteComm-TP
  2195.  
  2196.  
  2197.  
  2198.             DECLARATION            DECLARATION            ___________
  2199.  
  2200.             EnableXon(CPort:integer; XonFlag:boolean)
  2201.  
  2202.  
  2203.  
  2204.             RESULT TYPE            RESULT TYPE            ___________
  2205.  
  2206.                  boolean;
  2207.  
  2208.  
  2209.  
  2210.             DESCRIPTION            DESCRIPTION            ___________
  2211.  
  2212.             If XonFlag is TRUE, turns on semi-automatic XON-XOFF flow
  2213.             control function. If XonFlag is FALSE (the default setting),
  2214.             automatic flow control is disabled. When enabled, the kernel
  2215.             will automatically transmit an XOFF if and when the input
  2216.             buffer is approximately 2/3 full and will automatically
  2217.             recognize an XOFF sent by the companion system. If the
  2218.             companion system transmits an XOFF, the kernel will refuse
  2219.             to send any characters until the condition is cleared.
  2220.  
  2221.  
  2222.             It is the programmer's responsibility to transmit XON when
  2223.             conditions permit. See the XoffSent function to tell if an
  2224.             automatic XOFF has been sent by the kernel. See the XoffRecd
  2225.             function to determine if the kernel has detected an XOFF.
  2226.  
  2227.  
  2228.             If you intended to implement a protocol that might include
  2229.             the XON-XOFF characters, be sure to disable the automatic
  2230.             flow control. Failure to do so may result in a system hang.
  2231.  
  2232.  
  2233.  
  2234.             SEE ALSO            SEE ALSO            ________
  2235.  
  2236.                  XoffRecd, XoffRecd
  2237.  
  2238.  
  2239.  
  2240.                                       Page 34
  2241.                   CopyRight (c) 1988 Information Technology, Ltd.
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2249.                         for Microsoft, Datalight and Turbo C
  2250.            _______________________________________________________________           _______________________________________________________________
  2251.  
  2252.                XoffRecd function                             LctKrnl               XoffRecd function                             LctKrnl
  2253.            _______________________________________________________________           _______________________________________________________________
  2254.  
  2255.  
  2256.             FUNCTION            FUNCTION            ________
  2257.  
  2258.             Reports whether or not the kernel has detected an XOFF from
  2259.             the companion system
  2260.  
  2261.  
  2262.  
  2263.             DECLARATION            DECLARATION            ___________
  2264.  
  2265.             XoffRecd(CPort:integer)
  2266.  
  2267.  
  2268.  
  2269.             RESULT TYPE            RESULT TYPE            ___________
  2270.  
  2271.                  boolean
  2272.  
  2273.  
  2274.  
  2275.             REMARKS            REMARKS            _______
  2276.  
  2277.             Returns TRUE if an XOFF has been received, FALSE otherwise.
  2278.             If an XOFF has been received, the port's flag will be reset,
  2279.             and transmission to the companion system will be permitted.
  2280.             If an XON is received from the companion system, the port's
  2281.             flag will also be reset, permitting further transmissions to
  2282.             occur. Be aware that if the companion system never sends an
  2283.             XON after sending an XOFF, a possible race condition may                                                  race                                                                ____              
  2284.             occur, resulting in a system hang.
  2285.  
  2286.  
  2287.  
  2288.             SEE ALSO            SEE ALSO            ________
  2289.  
  2290.                  EnableXon, XoffSent
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.                                       Page 35
  2307.                   CopyRight (c) 1988 Information Technology, Ltd.
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2315.                         for Microsoft, Datalight and Turbo C
  2316.            _______________________________________________________________           _______________________________________________________________
  2317.  
  2318.             XoffSent function                                LctKrnl            XoffSent function                                LctKrnl
  2319.            _______________________________________________________________           _______________________________________________________________
  2320.  
  2321.  
  2322.             FUNCTION            FUNCTION            ________
  2323.  
  2324.             Reports whether or not the kernel has automatically sent an
  2325.             XOFF to the companion system.
  2326.  
  2327.  
  2328.  
  2329.             DECLARATION            DECLARATION            ___________
  2330.  
  2331.             XoffSent(CPort:integer)
  2332.  
  2333.  
  2334.  
  2335.             RESULT TYPE            RESULT TYPE            ___________
  2336.  
  2337.                  boolean
  2338.  
  2339.  
  2340.  
  2341.             REMARKS            REMARKS            _______
  2342.  
  2343.             Returns TRUE if the kernel has sent an XOFF to the companion
  2344.             system, FALSE otherwise. If an XOFF has been sent, the
  2345.             port's flag will be reset. You must send an XON character to
  2346.             the companion system to permit transmissions to proceed.
  2347.  
  2348.  
  2349.  
  2350.             SEE ALSO            SEE ALSO            ________
  2351.  
  2352.                  EnableXon, XoffRecd
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.                                       Page 36
  2373.                   CopyRight (c) 1988 Information Technology, Ltd.
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2381.                         for Microsoft, Datalight and Turbo C
  2382.            _______________________________________________________________           _______________________________________________________________
  2383.  
  2384.                LctGet function                               LctSupp               LctGet function                               LctSupp
  2385.            _______________________________________________________________           _______________________________________________________________
  2386.  
  2387.  
  2388.             FUNCTION            FUNCTION            ________
  2389.  
  2390.             Returns an available character from the ports input buffer.
  2391.  
  2392.  
  2393.  
  2394.             DECLARATION            DECLARATION            ___________
  2395.  
  2396.             LctGet(CPort:integer; var Ch:byte)
  2397.  
  2398.  
  2399.  
  2400.             RESULT TYPE            RESULT TYPE            ___________
  2401.  
  2402.                  boolean
  2403.  
  2404.  
  2405.  
  2406.             REMARKS            REMARKS            _______
  2407.  
  2408.             Places the next available character in the input buffer for
  2409.             the port in Ch. The function returns a value of TRUE if
  2410.             there is a character available, FALSE if there is no
  2411.             character available or on an error.  The contents of Ch are
  2412.             undefined when the return is FALSE.
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.                                       Page 37
  2439.                   CopyRight (c) 1988 Information Technology, Ltd.
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2447.                         for Microsoft, Datalight and Turbo C
  2448.            _______________________________________________________________           _______________________________________________________________
  2449.  
  2450.                LctPeek function                              LctSupp               LctPeek function                              LctSupp
  2451.            _______________________________________________________________           _______________________________________________________________
  2452.  
  2453.  
  2454.             FUNCTION            FUNCTION            ________
  2455.  
  2456.             Permits you to look at the next character in the ports input
  2457.             buffer without removing if from the buffer.
  2458.  
  2459.  
  2460.  
  2461.             DECLARATION            DECLARATION            ___________
  2462.  
  2463.             LctPeek(CPort:integer; var Ch:byte)
  2464.  
  2465.  
  2466.  
  2467.             RESULT TYPE            RESULT TYPE            ___________
  2468.  
  2469.                  boolean
  2470.  
  2471.  
  2472.  
  2473.             REMARKS            REMARKS            _______
  2474.  
  2475.             Places the next available character in the input buffer for
  2476.             the specified port into the Ch variable, but does not remove
  2477.             the character from the buffer. This allows the application
  2478.             to look-ahead by one character in a non-destructive fashion.               look-ahead                                                              __________                                               
  2479.             Returns FALSE if the port is not active, or if there are no
  2480.             characters in the port's buffer, TRUE otherwise. The
  2481.             contents of Ch are undefined when the result is FALSE
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.                                       Page 38
  2505.                   CopyRight (c) 1988 Information Technology, Ltd.
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2513.                         for Microsoft, Datalight and Turbo C
  2514.            _______________________________________________________________           _______________________________________________________________
  2515.  
  2516.                LctPut function                               LctSupp               LctPut function                               LctSupp
  2517.            _______________________________________________________________           _______________________________________________________________
  2518.  
  2519.  
  2520.             FUNCTION            FUNCTION            ________
  2521.  
  2522.             Places a character in the port's transmit buffer to be sent
  2523.             when the port is ready.
  2524.  
  2525.  
  2526.  
  2527.             DECLARATION            DECLARATION            ___________
  2528.  
  2529.             LctPut(CPort:integer; Ch:byte)
  2530.  
  2531.  
  2532.  
  2533.             RESULT TYPE            RESULT TYPE            ___________
  2534.  
  2535.                  boolean
  2536.  
  2537.  
  2538.  
  2539.             REMARKS            REMARKS            _______
  2540.  
  2541.             Returns TRUE if successful. Note that this does not
  2542.             guarantee that the character has been sent, only that no
  2543.             errors were detected. Returns FALSE if the port is not
  2544.             active, or if there no room in the port's buffer.
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.                                       Page 39
  2571.                   CopyRight (c) 1988 Information Technology, Ltd.
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2579.                         for Microsoft, Datalight and Turbo C
  2580.            _______________________________________________________________           _______________________________________________________________
  2581.  
  2582.                GetStream function                            LctSupp               GetStream function                            LctSupp
  2583.            _______________________________________________________________           _______________________________________________________________
  2584.  
  2585.  
  2586.             FUNCTION            FUNCTION            ________
  2587.  
  2588.                  Gets a stream of N characters from the port's
  2589.                  input buffer
  2590.  
  2591.  
  2592.             DECLARATION            DECLARATION            ___________
  2593.  
  2594.             GetStream(CPort:integer; var Buff; BCnt:integer)
  2595.  
  2596.  
  2597.  
  2598.             RESULT TYPE            RESULT TYPE            ___________
  2599.  
  2600.                  integer
  2601.  
  2602.  
  2603.  
  2604.             REMARKS            REMARKS            _______
  2605.  
  2606.             Reads a stream of, at most, BCnt characters from the serial
  2607.             port's input buffer into the Buff array. Returns the count
  2608.             of characters actually transferred, or -1 if an error
  2609.             occurs. NOTE that Buff is an array of characters or bytes,
  2610.             not a string, although you may treat a string variable like
  2611.             an array, as shown below.
  2612.  
  2613.  
  2614.  
  2615.             EXAMPLE            EXAMPLE            _______
  2616.  
  2617.                  Type
  2618.                     MaxStr = string[256];
  2619.                     
  2620.                     Var
  2621.                       StrBuff : MaxStr;
  2622.                       RecdLen : integer;
  2623.                     
  2624.                     begin
  2625.                       RecdLen := GetStream(2, StrBuff[1], 256);
  2626.                       if RecdLen <= 0 then     { error or no char }
  2627.                         StrBuff[0] := 0
  2628.                       else
  2629.                         StrBuff[0] := Chr(RecdLen);
  2630.                     end;
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.                                       Page 40
  2637.                   CopyRight (c) 1988 Information Technology, Ltd.
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2645.                         for Microsoft, Datalight and Turbo C
  2646.            _______________________________________________________________           _______________________________________________________________
  2647.  
  2648.                PutStream function                            LctSupp               PutStream function                            LctSupp
  2649.            _______________________________________________________________           _______________________________________________________________
  2650.  
  2651.  
  2652.             FUNCTION            FUNCTION            ________
  2653.  
  2654.             Places a stream of, at most, N characters in the port's
  2655.             transmit buffer.
  2656.  
  2657.  
  2658.  
  2659.             DECLARATION            DECLARATION            ___________
  2660.  
  2661.             PutStream(CPort:integer; var Buff; BCnt:integer)
  2662.  
  2663.  
  2664.  
  2665.             RESULT TYPE            RESULT TYPE            ___________
  2666.  
  2667.                  integer
  2668.  
  2669.  
  2670.  
  2671.             REMARKS            REMARKS            _______
  2672.  
  2673.             Buff is an array of character or byte, not a string,
  2674.             although it is possible to specify a string variable, using
  2675.             the same approach as outlined for the GetStream function.
  2676.             PutStream returns the number of characters actually placed
  2677.             into the buffer. Note that this does not guarantee that the
  2678.             characters have been sent. A value of 0 will be returned if
  2679.             any error occurs, or if there no room in the port's buffer.
  2680.  
  2681.  
  2682.  
  2683.             SEE ALSO            SEE ALSO            ________
  2684.  
  2685.                  PutStream
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.                                       Page 41
  2703.                   CopyRight (c) 1988 Information Technology, Ltd.
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2711.                         for Microsoft, Datalight and Turbo C
  2712.            _______________________________________________________________           _______________________________________________________________
  2713.  
  2714.                Buffer Flushing functions                     LctSupp               Buffer Flushing functions                     LctSupp
  2715.            _______________________________________________________________           _______________________________________________________________
  2716.  
  2717.  
  2718.             FUNCTION            FUNCTION            ________
  2719.  
  2720.             Provides several high level buffer management functions to
  2721.             control the contents of the port's transmit and receive
  2722.             buffers
  2723.  
  2724.  
  2725.  
  2726.             DELCLARATION            DELCLARATION            ____________
  2727.  
  2728.             function PurgeTxBuff(CPort:integer)
  2729.             
  2730.             function PurgeRxBuff(CPort:integer)
  2731.             
  2732.             procedure FlushUntilMatch(CPort:integer; Ch:byte)
  2733.             
  2734.             procedure FlushNBytes(CPort:integer; N:integer);
  2735.  
  2736.  
  2737.  
  2738.             RESULT TYPE            RESULT TYPE            ___________
  2739.  
  2740.                  boolean for PurgeTxBuff, PurgeRxBuff
  2741.  
  2742.  
  2743.  
  2744.             REMARKS            REMARKS            _______
  2745.  
  2746.             The PurgeRxBuff and PurgeTxBuff functions remove all
  2747.             characters from the port's receive and transmit buffers
  2748.             respectively and discard them; untransmitted characters in
  2749.             the transmit buffer are NEVER sent; unprocessed characters
  2750.             in the receive buffer are lost.  Both functions return a
  2751.             value of TRUE if no errors were encountered, FALSE
  2752.             otherwise.  An empty buffer is NOT considered an error.
  2753.  
  2754.  
  2755.             The FlushUntilMatch procedure will continually dispose of
  2756.             received characters until the character Ch is received. The
  2757.             procedure will return when the character Ch is detected, or
  2758.             when there are no more characters in the port's input
  2759.             buffer.
  2760.  
  2761.  
  2762.             The FlushNBytes procedure removes, at most, N characters
  2763.             from the port's receive buffer.
  2764.  
  2765.  
  2766.  
  2767.  
  2768.                                       Page 42
  2769.                   CopyRight (c) 1988 Information Technology, Ltd.
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2777.                         for Microsoft, Datalight and Turbo C
  2778.            _______________________________________________________________           _______________________________________________________________
  2779.  
  2780.                SendBreak function                            LctKrnl               SendBreak function                            LctKrnl
  2781.            _______________________________________________________________           _______________________________________________________________
  2782.  
  2783.  
  2784.             FUNCTION            FUNCTION            ________
  2785.  
  2786.             Send a true Break signal
  2787.  
  2788.  
  2789.  
  2790.             DECLARATION            DECLARATION            ___________
  2791.  
  2792.             SendBreak(CPort:integer)
  2793.  
  2794.  
  2795.  
  2796.             RESULT TYPE            RESULT TYPE            ___________
  2797.  
  2798.                  boolean
  2799.  
  2800.  
  2801.  
  2802.             REMARKS            REMARKS            _______
  2803.  
  2804.             SendBreak generates a BREAK signal using a particular
  2805.             characteristic of the 8250 UART to generate an accurate
  2806.             BREAK at any baud rate.  BREAKS generated in this manner are
  2807.             timed based upon the baud rate at which the 8250 is
  2808.             currently initialized.  This function may or may not work
  2809.             correctly with other than the actual 8250 UART.
  2810.  
  2811.  
  2812.             Returns TRUE if successful. Returns FALSE if an error is
  2813.             detected.
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.                                       Page 43
  2835.                   CopyRight (c) 1988 Information Technology, Ltd.
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2843.                         for Microsoft, Datalight and Turbo C
  2844.            _______________________________________________________________           _______________________________________________________________
  2845.  
  2846.                HAYES MODEM FUNCTIONS                        LctHayes               HAYES MODEM FUNCTIONS                        LctHayes
  2847.            _______________________________________________________________           _______________________________________________________________
  2848.  
  2849.  
  2850.             FUNCTION            FUNCTION            ________
  2851.  
  2852.             Provides support for various aspects of modems the support
  2853.             the Hayes(tm) command set.
  2854.  
  2855.  
  2856.  
  2857.             DECLARATIONS            DECLARATIONS            ____________
  2858.  
  2859.             CONST
  2860.               NUMRES = 0     { numeric result codes}
  2861.               WRDRES = 1     { word result codes }
  2862.               SPKOFF = 0     { speaker off }
  2863.               SPKON  = 1     { speaker on until CD }
  2864.               SPKSPC = 2     { speaker always on }
  2865.               ONHK   = 0     { go on-hook (hang up) }
  2866.               OFFHK  = 1     { go off-hook (lift receiver) }
  2867.               OFFHKS = 2     { go off-hook, don't close relay }
  2868.               BASIC  = 0     { basic result set }
  2869.               EXSET1 = 1     { extended results, set 1 }
  2870.               EXSET3 = 2     { extended results, set 3 }
  2871.               EXSET4 = 3     { extended results, set 4 }
  2872.             
  2873.  
  2874.  
  2875.             TYPE
  2876.               TelNumStr = string[20];
  2877.             
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.                                       Page 44
  2901.                   CopyRight (c) 1988 Information Technology, Ltd.
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2909.                         for Microsoft, Datalight and Turbo C
  2910.  
  2911.             procedure SetType(NType : byte)
  2912.             
  2913.             procedure SetSet(NSet : byte)
  2914.             
  2915.             function RetType : byte
  2916.             
  2917.             function RetSet : byte
  2918.             
  2919.             function ModemCodesOn(CPort : integer):boolean
  2920.             
  2921.             function ModemCodesOff(CPort : integer):boolean
  2922.             
  2923.             function ModemWordResponse(CPort : integer):boolean
  2924.             
  2925.             function ModemDigitResponse(CPort : integer):boolean
  2926.             
  2927.             function RepeatModemCommand(CPort : integer):boolean
  2928.             
  2929.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  2930.             
  2931.             function SetModemRegister(CPort, Reg, NValue : integer) :
  2932.             boolean
  2933.             
  2934.             function GetModemRegister(CPort, Reg, NValue : integer) :
  2935.             boolean
  2936.             
  2937.             function ModemHalfDuplex(CPort : integer) : boolean
  2938.             
  2939.             function ModemFullDuplex(CPort : integer) : boolean
  2940.             
  2941.             function ModemEchoCmd(CPort : integer) : boolean
  2942.             
  2943.             function ModemNoEchoCmd(CPort : integer) : boolean
  2944.             
  2945.             function ModemHookMode(CPort : integer; HMode : byte) :
  2946.             boolean
  2947.             
  2948.             function ModemCarrierOn(CPort : integer) : boolean
  2949.             
  2950.             function ModemCarrierOff(CPort : integer) : boolean
  2951.             
  2952.             function ModemWordResponse(CPort : integer):boolean
  2953.             
  2954.             function ModemDigitResponse(CPort : integer):boolean
  2955.             
  2956.             function RepeatModemCommand(CPort : integer):boolean
  2957.             
  2958.             function ModemSpeaker(CPort : integer; Mode : byte):boolean
  2959.             
  2960.             function SetModemRegister(CPort, Reg, NValue : integer) :
  2961.             boolean
  2962.             
  2963.             function GetModemRegister(CPort, Reg, NValue : integer) :
  2964.             boolean
  2965.             
  2966.                                       Page 45
  2967.                   CopyRight (c) 1988 Information Technology, Ltd.
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  2975.                         for Microsoft, Datalight and Turbo C
  2976.  
  2977.             function ModemHalfDuplex(CPort : integer) : boolean
  2978.             
  2979.             function ModemFullDuplex(CPort : integer) : boolean
  2980.             
  2981.             function ModemEchoCmd(CPort : integer) : boolean
  2982.             
  2983.             function ModemNoEchoCmd(CPort : integer) : boolean
  2984.             
  2985.             function ModemHookMode(CPort : integer; HMode : byte) :
  2986.             boolean
  2987.             
  2988.             function ModemCarrierOn(CPort : integer) : boolean
  2989.             
  2990.             function ModemCarrierOff(CPort : integer) : boolean
  2991.             
  2992.             function ModemCodeSet(CPort : integer; NewSet : byte) :
  2993.             boolean
  2994.             
  2995.             function ModemPulse(CPort : integer) : boolean
  2996.             
  2997.             function ModemTone(CPort : integer) : boolean
  2998.             
  2999.             function ModemDial(CPort : integer; TelNo : TelNumStr) :
  3000.             boolean
  3001.  
  3002.  
  3003.  
  3004.             REMARKS            REMARKS            _______
  3005.  
  3006.             The ModemCodeSet function allows you to change the set of
  3007.             codes that are returned by the modem when an action is
  3008.             specified.
  3009.  
  3010.  
  3011.             ModemDial instructs the modem to dial the number contained
  3012.             in TelNo. Do not include the dialing (ATD) prefix, or the
  3013.             trailing <CR>. These are provided by the function. You may
  3014.             include non-numeric characters as the contents of TelNo are
  3015.             not checked. The dialing is done in the last known, pulse or
  3016.             tone, mode. If you use the MpdemPulse or ModemTone
  3017.             functions, then dialing will be done in the mode that was
  3018.             last correctly enabled. If you have not exercised these
  3019.             functions, then dialing occurs in the modems default or
  3020.             power-up mode.
  3021.  
  3022.  
  3023.             The ModemHalfDuplex and ModemFullDuplex functions place the
  3024.             modem into local echo and remote echo modes respectively.
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.                                       Page 46
  3033.                   CopyRight (c) 1988 Information Technology, Ltd.
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  3041.                         for Microsoft, Datalight and Turbo C
  3042.  
  3043.             The GetModemRegister function requests that the modem return
  3044.             the current value of S-register Reg. Reg must be in the
  3045.             range 0 to 13. Use the GetStream, or similar function, to
  3046.             retrieve the modem's response. Specifying a register outside
  3047.             the 0 to 13 range will cause a return of FALSE.
  3048.  
  3049.  
  3050.             SetModemRegister is the companion to GetModemRegister, with
  3051.             the same restrictions. Sets the S-register Reg to the value
  3052.             contained in NValue. If NValue contains -1, then the
  3053.             register is reset to its default (power-up) value. The
  3054.             function checks the value to be certain that it is within
  3055.             the limits specified for the particular register, and
  3056.             returns a value of FALSE if the value is outside the
  3057.             predefined limits.
  3058.  
  3059.  
  3060.             ModemCarrierOff enables modem carrier detect, but disables
  3061.             the modems carrier signal. The ModemCarrierOn companion
  3062.             enables both carrier detect and the modems carrier signal.
  3063.             When ModemCarrierOff is used the modem will receive data but
  3064.             will be unable to send data.
  3065.  
  3066.  
  3067.             The ModemNoEchoCmd and ModemEchoCmd functions determine
  3068.             whether commands sent to the modem are echoed back to the
  3069.             sending program. With echo turned off, the modem will
  3070.             continue to accept commands, but will not try to redisplay
  3071.             the command's characters.
  3072.  
  3073.  
  3074.             ModemHookMode allows you to control the current status of
  3075.             the modem's telephone line connection. See your modem's
  3076.             documentation and the above constants for additional
  3077.             information.
  3078.  
  3079.  
  3080.             The ModemRepeatCommand function instructs the modem to
  3081.             repeat the last command sequence executed. Generally, this
  3082.             function is of greatest value in re-dialing numbers that are
  3083.             busy, although its use is not restricted to that.
  3084.  
  3085.  
  3086.             The way in which your modem responds to commands is
  3087.             determined, in part, by the ModemWordResponse and
  3088.             ModemDigitResponse functions. If you call ModemWordResponse,
  3089.             then modem responses use the English language response
  3090.             codes, e.g. CONNECT or OK. Calling ModemDigitResponse
  3091.             instructs the modem to respond with code numbers only from
  3092.             the currently selected response set, see the ModemCodeSet
  3093.             function above.
  3094.  
  3095.  
  3096.  
  3097.  
  3098.                                       Page 47
  3099.                   CopyRight (c) 1988 Information Technology, Ltd.
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  3107.                         for Microsoft, Datalight and Turbo C
  3108.  
  3109.             You may use the functions ModemCodesOn and ModemCodesOff to
  3110.             specify whether you want your modem to send back response
  3111.             codes when it receives a command string. In a sense, these
  3112.             act as companions to the EchoCmd functions above.
  3113.  
  3114.  
  3115.             Use the ModemSpeaker function to control the modem's
  3116.             internal speaker, if it has one. See the above constants for
  3117.             the applicable codes.
  3118.  
  3119.  
  3120.             The RetSet and RetType functions return, respectively, the
  3121.             last known command set (ModemCodeSet) and last known result
  3122.             type (ModemWordResponse, ModemDigitResponse). The RetSet and
  3123.             RetType  functions are only of value when used in
  3124.             conjunction with the companion functions.
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.                                       Page 48
  3165.                   CopyRight (c) 1988 Information Technology, Ltd.
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  3173.                         for Microsoft, Datalight and Turbo C
  3174.  
  3175.             GENERAL REMARKS            GENERAL REMARKS            _______________
  3176.  
  3177.  
  3178.             Several considerations are in order if you intend to use the
  3179.             Hayes ToolBox functions.
  3180.  
  3181.  
  3182.  
  3183.                 1. You are responsible for checking the return
  3184.                    codes from the modem once you have given modem a
  3185.                    command. To make the task easier, we suggest
  3186.                    that you turn OFF command echo (so that you
  3187.                    don't have to worry about separating commands
  3188.                    from responses) and turn ON numeric responses
  3189.                    (to make the interpretation of result codes
  3190.                    easier and faster).
  3191.  
  3192.  
  3193.                 2. Be sure that you allow  adequate time between
  3194.                    commands for the modem to process the command
  3195.                    and respond. Failure to observe this rule may
  3196.                    result in commands being misinterpreted or
  3197.                    "lost". You can monitor the number of characters
  3198.                    in the receive buffer to help you with the
  3199.                    timing. Or alternatively, check the response
  3200.                    after each command. The latter approach is more
  3201.                    in line with what we believe to be good
  3202.                    programming practice.
  3203.  
  3204.  
  3205.             RETURN VALUES            RETURN VALUES            _____________
  3206.  
  3207.             All functions return a value of FALSE if a port or other
  3208.             error is detected, TRUE otherwise.
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.                                       Page 49
  3231.                   CopyRight (c) 1988 Information Technology, Ltd.
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.                       LITECOMM-TP (tm) COMMUNICATIONS TOOLBOX
  3239.                         for Microsoft, Datalight and Turbo C
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.                                       Page 50
  3297.                   CopyRight (c) 1988 Information Technology, Ltd.
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.                            LITECOMM-TP REGISTRATION FORM                           LITECOMM-TP REGISTRATION FORM                           _____________________________
  3306.  
  3307.             Please complete the following information. Note that the
  3308.             prices below are for a single-use registration only. Please
  3309.             contact us directly for site licensing.
  3310.  
  3311.             Mail to:
  3312.                  Information Technology
  3313.                  PO Box 554
  3314.                  Coventry, RI 02816
  3315.                  Telephone Orders or Information (401) 826-2223
  3316.             ┌──────────────────────────────────────────────────────────┐
  3317.             │ SHIP TO:                                                 │
  3318.             │ Name    ________________________________________         │
  3319.             │                                                          │
  3320.             │ Company ________________________________________         │
  3321.             │                                                          │
  3322.             │ Street  ________________________________________         │
  3323.             │                                                          │
  3324.             │         ________________________________________         │
  3325.             │                                                          │
  3326.             │ City    ___________________  State __  Zip _____         │
  3327.             │                                                          │
  3328.             │ Telephone _______________________                        │
  3329.             ├─────┬──────────┬───────────────────┬─────────────────────┤
  3330.             │     │          │                   │                     │
  3331.             │ QTY │          │ REGISTRATION TYPE │ REGISTRATION FEE    │
  3332.             │     │          │                   │                     │
  3333.             ├─────┼──────────┼───────────────────┼─────────────────────┤
  3334.             │     │          │                   │                     │
  3335.             │     │   BOTH   │ LIBRARIES @ $30   │                     │
  3336.             │     │ INCLUDE  │                   │                     │
  3337.             ├─────┼          ┼───────────────────┼─────────────────────┤
  3338.             │     │ PRINTED  │                   │                     │
  3339.             │     │ MANUAL   │ LIBRARIES AND     │                     │
  3340.             │     │          │ SOURCE  @ $55     │                     │
  3341.             │     │          │                   │                     │
  3342.             ├─────┼──────────┼───────────────────┼─────────────────────┤
  3343.             │     │          │                   │                     │
  3344.             │     │          │ RI Sales Tax 6%   │                     │
  3345.             │     │          │                   │                     │
  3346.             └─────┴──────────┴───────────────────┴─────────────────────┘
  3347.             Method of Payment (Check, Mastercard, Visa) _____________
  3348.             
  3349.                  Credit Card Number __________________________
  3350.             
  3351.                  Expiration Date __________________________
  3352.             
  3353.                  Name as it appears on card ___________________________
  3354.             
  3355.                  Signature for MC/VISA ________________________________
  3356.             
  3357.             All MasterCard/Visa orders must include a telephone number,
  3358.             
  3359.             We regret that we cannot accept COD orders
  3360.            _______________________________________________________________
  3361.             (office use only)
  3362.                 Date Received ______________ Date Sent _____________
  3363.                 Version ______________ Serial Number _______________
  3364.  
  3365.  
  3366.  
  3367.